

/** @defgroup EXAMPLES Automatic Comments for Document Example
 *  @author   http://ly4cn.cnblogs.com/archive/2005/11/23/282637.html 
 *  @version  1.0
 *  @date     2009-2010
 *  @{
 */


///\whqComment{Member Groups with C++ Style}
///@name File Name Constants [Member Groups with C++ Style, whq]
//@{

/** Log File Name */
#define LOG_FILENAME "d:\\log\\debug.log"
/** Data File Name */
#define DATA_FILENAME "d:\\data\\detail.dat"
/** Back Up File Name */
#define BAK_FILENAME "d:\\data\\backup.dat"

//@}

/** @name System Status Constants [Member Groups with C Style, whq]
@{*/
 
/** Normal Status */
#define SYS_NORMAL 0
/** Fault Status */
#define SYS_FAULT 1
/** Warn Status*/
#define SYS_WARNNING 2

/*@}*/



/** Enum Constants */
typedef enum TDayOfWeek
{
		SUN = 0, /**< Sunday */
		MON = 1, /**< Monday */
		TUE = 2, /**< Tuesday */
		WED = 3, /**< Wenesday */
		THU = 4, /**< Thursday */
		FRI = 5, /**< Friday */
		SAT = 6  /**< Saturday */
}
/** Define Type TEnumDayOfWeek */
TEnumDayOfWeek;  
/** Define Type  PEnumDayOfWeek */
typedef TEnumDayOfWeek* PEnumDayOfWeek; 

/** Define enum variable enum1 */
TEnumDayOfWeek enum1;		
/** Define enum variable enum2 */
PEnumDayOfWeek p_enum2; 



/** @defgroup FileUtils File Operating Functions
 *  @{
 */

/** Open File \n
 *  After open file, use ::CloseFile to close it.[Links to ::CloseFile is created when use '::' before a function name. whq]
 *  @param[in] file_name name of the file
 *  @param[in] file_mode mod string of the file
 *  [whq, lists example] 
 *  - r Read
 *        -# [whq, '-' begins a list, '-#' begins a numbered list.]
 *        -# [whq, nesting of lists is based on indentation of items.]
 *  - w Write
 *  @return Return no of file
 *  - -1 indicates fail to open file

 *  [whq, \@note \@par and \@code are very useful]
 *  @note After open file, use ::CloseFile to close it.
 *  @par Example:
 *  @code
    // Open file read-only as text
    int f = OpenFile("d:\\test.txt", "rt");
 *  @endcode
 
 *  @see ::ReadFile ::WriteFile ::CloseFile
 *  @deprecated This function may be cancelled in future releases.
 */
int OpenFile(const char* file_name, const char* file_mode);

/** Read File \n
 *  @param[in] file File No, refer ::OpenFile
 *  @param[out] buffer Used to store read result.
 *  @param[in] len Length need to read
 *  @return Return length of read
 *  - -1 Indicates fail to read file.
 
 *  @pre \e file variable must use ::OpenFile return result
 *  @pre \e buffer Can't be NULL.
 *  @see ::OpenFile ::WriteFile ::CloseFile
 */
int ReadFile(int file, char* buffer, int len);

/** Write File \n 
 *  @param[in] file File NO. See ::OpenFile
 *  @param[in] buffer Store contents written into.
 *  @param[in] len Length of what is written
 *  @return Return length of writting.
 *  - -1 indicates fail to write
 
 *  @pre \e file variable must use ::OpenFile return result.
 *  @see ::OpenFile ::ReadFile ::CloseFile
 */
int WriteFile(int file, const char* buffer, int len);

/** Close File \n
 *  @param file File No, see ::OpenFile
 *  @retval 0  Success
 *  @retval -1 Fail
 
 *  @see ::OpenFile ::WriteFile ::ReadFile
 *  @deprecated This function may be cancelled in future release.
 */
int CloseFile(int file);

/** @}*/ // File Operating Functions

/** @}*/ // Automatich Comments for Document Example
